cmake_minimum_required(VERSION 3.8)

project(tx_grpc)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}/grpc1.71.0/include
    ${CMAKE_CURRENT_SOURCE_DIR}/tx_grpc/include()
)

link_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}/grpc1.71.0/lib
    ${CMAKE_CURRENT_SOURCE_DIR}/tx_grpc/lib
)

set(GRPC_LIB
    libabsl_bad_any_cast_impl.so
    libabsl_bad_optional_access.so
    libabsl_bad_variant_access.so
    libabsl_base.so
    libabsl_city.so
    libabsl_civil_time.so
    libabsl_cord_internal.so
    libabsl_cord.so
    libabsl_cordz_functions.so
    libabsl_cordz_handle.so
    libabsl_cordz_info.so
    libabsl_cordz_sample_token.so
    libabsl_crc32c.so
    libabsl_crc_cord_state.so
    libabsl_crc_cpu_detect.so
    libabsl_crc_internal.so
    libabsl_debugging_internal.so
    libabsl_decode_rust_punycode.so
    libabsl_demangle_internal.so
    libabsl_demangle_rust.so
    libabsl_die_if_null.so
    libabsl_examine_stack.so
    libabsl_exponential_biased.so
    libabsl_failure_signal_handler.so
    libabsl_flags_commandlineflag_internal.so
    libabsl_flags_commandlineflag.so
    libabsl_flags_config.so
    libabsl_flags_internal.so
    libabsl_flags_marshalling.so
    libabsl_flags_parse.so
    libabsl_flags_private_handle_accessor.so
    libabsl_flags_program_name.so
    libabsl_flags_reflection.so
    libabsl_flags_usage_internal.so
    libabsl_flags_usage.so
    libabsl_graphcycles_internal.so
    libabsl_hash.so
    libabsl_hashtablez_sampler.so
    libabsl_int128.so
    libabsl_kernel_timeout_internal.so
    libabsl_leak_check.so
    libabsl_log_entry.so
    libabsl_log_flags.so
    libabsl_log_globals.so
    libabsl_log_initialize.so
    libabsl_log_internal_check_op.so
    libabsl_log_internal_conditions.so
    libabsl_log_internal_fnmatch.so
    libabsl_log_internal_format.so
    libabsl_log_internal_globals.so
    libabsl_log_internal_log_sink_set.so
    libabsl_log_internal_message.so
    libabsl_log_internal_nullguard.so
    libabsl_log_internal_proto.so
    libabsl_log_severity.so
    libabsl_log_sink.so
    libabsl_low_level_hash.so
    libabsl_malloc_internal.so
    libabsl_periodic_sampler.so
    libabsl_poison.so
    libabsl_random_distributions.so
    libabsl_random_internal_distribution_test_util.so
    libabsl_random_internal_platform.so
    libabsl_random_internal_pool_urbg.so
    libabsl_random_internal_randen_hwaes_impl.so
    libabsl_random_internal_randen_hwaes.so
    libabsl_random_internal_randen_slow.so
    libabsl_random_internal_randen.so
    libabsl_random_internal_seed_material.so
    libabsl_random_seed_gen_exception.so
    libabsl_random_seed_sequences.so
    libabsl_raw_hash_set.so
    libabsl_raw_logging_internal.so
    libabsl_scoped_set_env.so
    libabsl_spinlock_wait.so
    libabsl_stacktrace.so
    libabsl_statusor.so
    libabsl_status.so
    libabsl_strerror.so
    libabsl_str_format_internal.so
    libabsl_strings_internal.so
    libabsl_strings.so
    libabsl_string_view.so
    libabsl_symbolize.so
    libabsl_synchronization.so
    libabsl_throw_delegate.so
    libabsl_time.so
    libabsl_time_zone.so
    libabsl_utf8_for_code_point.so
    libabsl_vlog_config_internal.so
    libaddress_sorting.so
    libcrypto.so
    libgpr.so
    libgrpc++_alts.so
    libgrpc_authorization_provider.so
    libgrpc++_error_details.so
    libgrpc_plugin_support.so
    libgrpcpp_channelz.so
    libgrpc++_reflection.so
    libgrpc++.so
    libgrpc.so
    libgrpc++_unsecure.so
    libgrpc_unsecure.so
    libprotobuf-lite.so
    libprotobuf.so
    libprotoc.so
    libre2.so
    libssl.so
    libupb_base_lib.so
    libupb_json_lib.so
    libupb_mem_lib.so
    libupb_message_lib.so
    libupb_mini_descriptor_lib.so
    libupb_textformat_lib.so
    libupb_wire_lib.so
    libutf8_range_lib.so
    libutf8_range.so
    libutf8_validity.so
    libz.so
)

add_executable(server server.cpp)
target_link_libraries(server ${GRPC_LIB} tx_grpc)

add_executable(client client.cpp)
target_link_libraries(client ${GRPC_LIB} tx_grpc)
